# Contributor: pcworld <0188801@gmail.com>
# Maintainer:
pkgname=evolution-etesync
pkgver=1.1.0
pkgrel=0
pkgdesc="EteSync plugin for Evolution"
url="https://gitlab.gnome.org/GNOME/evolution-etesync"
# s390x and riscv64 blocked by libetebase/rust/cargo
arch="all !s390x !riscv64"
license="LGPL-2.1-or-later"
makedepends="cmake evolution evolution-dev evolution-data-server-dev libetebase libetebase-dev intltool"
source="$pkgname-$pkgver.tar.gz::https://gitlab.gnome.org/GNOME/evolution-etesync/-/archive/$pkgver/evolution-etesync-$pkgver.tar.gz"
subpackages="$pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None .
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="eb6010794b48b81d5d3f06d894420cba05ac6b7816cdee8897bd98464227a9e679d636d1203be5f2eb9bde49a800920aceeedc33d331a442fbeb65e66c7b15d3  $pkgname-$pkgver.tar.gz"
